from django.db import models

class Language(models.Model):
    name = models.CharField(max_length=200)
    longname = models.CharField(max_length=200)
    class Admin:
        pass

class Scratch(models.Model):
    parent_id = models.IntegerField(null=True, db_index=True)
    code = models.TextField()
    processed_code = models.TextField(null=True)
    lj_code = models.TextField(null=True)
    language_id = models.ForeignKey(Language)
    comment = models.TextField(null=True)
    pub_date = models.DateTimeField(auto_now=True)
    private_key = models.CharField(max_length=12, db_index=True, null=True)
    class Admin:
        pass
    
